home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Form1
- Caption = "UDP Broadcast Demo"
- ClientHeight = 5175
- ClientLeft = 1305
- ClientTop = 2055
- ClientWidth = 7845
- ForeColor = &H00000000&
- Height = 5580
- Left = 1245
- LinkTopic = "Form1"
- ScaleHeight = 5175
- ScaleWidth = 7845
- Top = 1710
- Width = 7965
- Begin CommandButton Command2
- Caption = "Clear"
- Height = 375
- Left = 5880
- TabIndex = 2
- Top = 300
- Width = 1335
- End
- Begin CommandButton Command1
- Caption = "Test!!"
- Height = 375
- Left = 4440
- TabIndex = 0
- Top = 300
- Width = 1335
- End
- Begin UDPPORT UDPPort1
- InBufferSize = 2048
- Left = 3480
- LocalPort = 0
- OutBufferSize = 2048
- RemoteHost = "255.255.255.255"
- RemotePort = 0
- Top = 720
- End
- Begin Label Label2
- Caption = "This demo will poll every UNIX host on the local net for DayTime (port 13)"
- ForeColor = &H000000FF&
- Height = 255
- Left = 120
- TabIndex = 1
- Top = 60
- Width = 7695
- End
- Sub Command1_Click ()
- UDPPort1.Active = True
- UDPPort1.RemoteHost = "255.255.255.255" 'broadcast address
- UDPPort1.RemotePort = 13 'daytime
- UDPPort1.DataToSend = "!" ' just send something!!
- End Sub
- Sub Command2_Click ()
- Cls: Print : Print : Print : Print
- End Sub
- Sub Form_Load ()
- Cls: Print : Print : Print : Print
- End Sub
- Sub UDPPort1_DataIn (Datagram As String, SourceAddress As String, SourcePort As Integer)
- Print "From: " & SourceAddress & " :: " & Datagram
- End Sub
-